<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
<title>发货单管理</title>
<meta name="decorator" content="default" />
<script type="text/javascript">
		$(document).ready(function() {
			
		});
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
        	return false;
        }
	</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li class="active">
			<a href="#">缺货单</a>
		</li>
	</ul>
	<form:form id="searchForm" modelAttribute="genProduct" action="${ctx}/order/stock/manage/" method="post" class="breadcrumb form-search">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}" />
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}" />
		<ul class="ul-form">
			<li>
				<label>商品名称：</label> 
				<form:input path="name" htmlEscape="false" maxlength="64" class="input-medium" />
			</li>
			<li>
				<label>分类：</label> 
			    <form:select path="catalogid" htmlEscape="false" maxlength="4" class="input-medium" >
			    	<form:option value="">请选择</form:option>
			    	<c:forEach items="${genCatalogs }" var="genCatalog">
			    		<form:option value="${genCatalog.id }">${genCatalog.name }</form:option>
			    	</c:forEach>
                </form:select>
			</li>
			<li class="btns"><input id="btnSubmit" class="btn btn-primary"
				type="submit" value="查询" /></li>
			<li class="clearfix"></li>
		</ul>
	</form:form>
	<sys:message content="${message}" />
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead>
			<tr>
				<th>序号</th>
				<th>商品名称</th>
				<th>货号</th>
				<th>分类</th>
				<th>库存</th>
			</tr>
		</thead>
		<tbody>
			<c:forEach items="${page.list}" var="product" varStatus="status">
				<tr>
					<td>
						${status.index + 1}
					</td>
					<td><a href="${ctx}/product/product/genProduct/form?id=${product.id}">${product.name}</a></td>
					<td>${product.code}</td>
					<td>${product.catalogName}</td>
					<td>${product.stock}</td>
				</tr>
			</c:forEach>
			
		</tbody>
	</table>
	<div class="pagination">${page}</div>
</body>
</html>